﻿<nav>
	<ul id="menu">
        @if (Request.IsAuthenticated) {
            <li>
                @Html.ActionLink(User.Identity.Name, "Index", "Manage", new { area = "AccountArea" }, htmlAttributes: new { @class = "username", title = "Manage" })
            </li>
            <li>
                @using (Html.BeginForm("LogOff", "Login", new { area = "AccountArea" }, FormMethod.Post, new { id = "logoutForm" }))
                {
                    @Html.AntiForgeryToken()
                    <a href="javascript:document.getElementById('logoutForm').submit()">Log off</a>
                }
            </li>
        }
        else
        {
            <li>
                @Html.ActionLink("Register", "Index", "Register", new { area = "AccountArea" }, null)
            </li>
            <li>
                @Html.ActionLink("Log in", "Index", "Login", new { area = "AccountArea" }, null)
            </li>
        }
	</ul>
</nav>
